﻿namespace _1.FactoryPattern.Pattern
{
    internal class ShapeFactory
    {
        public IShape GetSharp(string shape)
        {
            IShape product = null;
            switch (shape)
            {
                case "Rect":
                    product = new Rect();
                    break;
                case "Circle":
                    product = new Circle();
                    break;
                case "Square":
                    product = new Square();
                    break;
                default:
                    break;
            }

            return product;
        }
    }
}
